﻿/**
 * Collection
 *
 * @author		Allen Chou
 * @version		1.0.0 (last update: Dec 13 2008)
 * @link        http://cjcat.blogspot.com
 * @link		http://cjcat2266.deviantart.com
 */

package idv.cjcat.ds {
	
	/**
	 * The <code>Collection</code> interface specifies standard operations of a collection.
	 */
	public interface ICollection {
		
		/**
		 * Determins if a specified item belongs to the collection.
		 * @param	item  The item.
		 * @return Whether the item is in the collection.
		 */
		function contains(item:*):Boolean;
		
		/**
		 * Removes all items from the collection.
		 */
		function clear():void;
		
		/**
		 * Determines if the collection is empty.
		 * @return Whether the collection is empty.
		 */
		function isEmpty():Boolean;
		
		/**
		 * The number of items in the collection.
		 */
		function get size():int;
		
		/**
		 * Instantiates an iterator for the collection that points to the first item.
		 * @return  The iterator.
		 */
		function getIterator():Iterator;
		
	}
	
}